package com.futureCloudMOM.controller.core.web.facility;

import com.futureCloudMOM.common.core.page.TableDataInfo;
import com.futureCloudMOM.controller.core.controller.BaseApiController;
import com.futureCloudMOM.core.domain.FacilityResourceDetail;
import com.futureCloudMOM.core.service.FacilityResourceDetailService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 文件名 FacilityResourceDetailController
 *
 * @since 2023/6/6 15:22
 */
@Api(tags = "设备信息")
@RestController
@RequestMapping("facility/resource_detail")
public class FacilityResourceDetailController extends BaseApiController<FacilityResourceDetail,  FacilityResourceDetail, FacilityResourceDetailService> {

    public FacilityResourceDetailController(FacilityResourceDetailService service) {
        super(service);
    }

    @ApiOperation("查询设备--可根据名称和编码筛选数据--可分页")
    @PostMapping("/getListByNameAndCode")
    public TableDataInfo getListByNameAndCode(@RequestBody FacilityResourceDetail detail){
        startPage();
        return getDataTable(service.getListByNameAndCode(detail));
    }

}
